package com.android.love.parser;

import com.alibaba.fastjson.JSON;
import com.android.love.util.LogUtil;

public class OrderParser extends BaseParser<String[]> {
	private static final String TAG = "AddressParser";

	@Override
	public String[] parserJson(String jsonStr) {
		String[] ids = new String[2];
		LogUtil.i(TAG, "data11---" + jsonStr);
		if (checkResponse(jsonStr)) {
			String data = jsonObject.getString("data");
			LogUtil.i(TAG, "data---" + data);
			if (data != null) {
				jsonObject = JSON.parseObject(data);
				String order_id = jsonObject.getString("order_id");
				ids[0] = order_id;
				String trade_no = jsonObject.getString("trade_no");
				// if (trade_no != null)
				ids[1] = trade_no;
				// else
				// ids[1] = 0L;
				return ids;
			}
		}
		// LogUtil.i(TAG, "address_id---" + order_id);
		return null;
	}
}
